//
//  UIView+Frame.m
//  ShiShiBang
//
//  Created by songbaoqiang on 16/9/1.
//  Copyright © 2016年 motianjituan. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)

- (void)setMt_x:(CGFloat)mt_x
{
    CGRect frame = self.frame;
    frame.origin.x = mt_x;
    self.frame = frame;
}

- (CGFloat)mt_x
{
    return self.frame.origin.x;
}

- (void)setMt_y:(CGFloat)mt_y
{
    CGRect frame = self.frame;
    frame.origin.y = mt_y;
    self.frame = frame;
}

- (CGFloat)mt_y {
    return self.frame.origin.y;
}

- (void)setMt_height:(CGFloat)mt_height
{
    CGRect frame = self.frame;
    frame.size.height = mt_height;
    self.frame = frame;
}

- (CGFloat)mt_height {
    return self.frame.size.height;
}

- (void)setMt_centerx:(CGFloat)mt_centerx
{
    CGPoint center = self.center;
    center.x = mt_centerx;
    self.center = center;
}

- (CGFloat)mt_centerx {
    return self.center.x;
}

- (void)setMt_centery:(CGFloat)mt_centery
{
    CGPoint center = self.center;
    center.y = mt_centery;
    self.center = center;
}

- (CGFloat)mt_centery {
    return self.center.y;
}

- (void)setMt_width:(CGFloat)mt_width
{
    CGRect frame = self.frame;
    frame.size.width = mt_width;
    self.frame = frame;
}

- (CGFloat)mt_width {
    return self.frame.size.width;
}

@end
